Microsoft DirectX 8.1 (C++)

IVideoWindow::SetWindowPosition

The SetWindowPosition method sets the position of the video window.

Syntax

HRESULT SetWindowPosition(
  long Left,
  long Top,
  long Width,
  long Height
);

Parameters

Left

[in] Specifies the x-coordinate, in pixels.

Top

[in] Specifies the y-coordinate, in pixels.

Width

[in] Specifies the width, in pixels.

Height

[in] Specifies the height, in pixels.

Return Values

Possible return values include the following:

Value Description
E_INVALIDARG Invalid argument.
S_OK Success.
VFW_E_NOT_CONNECTED The pins are not connected.

Remarks

This method has the same effect as calling the IVideoWindow::put_Left, IVideoWindow::put_Top, IVideoWindow::put_Width, and IVideoWindow::put_Height methods.

If resizing the window to the specified dimensions is impossible, this method modifies the window's size and location to make the window fit. Call the IVideoWindow::GetWindowPosition method to determine the result.

See Also